diff options
Diffstat (limited to 'app/[lng]/partners')
| -rw-r--r-- | app/[lng]/partners/(partners)/rfq-last/[id]/page.tsx | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app/[lng]/partners/(partners)/rfq-last/[id]/page.tsx b/app/[lng]/partners/(partners)/rfq-last/[id]/page.tsx index 7a68e3a2..9052de6f 100644 --- a/app/[lng]/partners/(partners)/rfq-last/[id]/page.tsx +++ b/app/[lng]/partners/(partners)/rfq-last/[id]/page.tsx @@ -86,6 +86,23 @@ export default async function VendorResponsePage({ params }: PageProps) { if (!rfq || !rfq.rfqDetails[0]) { notFound() } + + // 취소된 RFQ 접근 제어 + if (rfq.status === "RFQ 삭제") { + return ( + <div className="flex h-full items-center justify-center"> + <div className="text-center max-w-md"> + <h2 className="text-xl font-bold">접근 불가</h2> + <p className="mt-2 text-muted-foreground">이 RFQ는 삭제되어 접근할 수 없습니다.</p> + <div className="mt-4 p-4 bg-muted rounded-lg text-left"> + <p className="text-sm font-medium mb-2">삭제 사유:</p> + <p className="text-sm text-muted-foreground whitespace-pre-wrap">{rfq.deleteReason}</p> + </div> + + </div> + </div> + ) + } const rfqDetail = rfq.rfqDetails[0] @@ -99,8 +116,28 @@ export default async function VendorResponsePage({ params }: PageProps) { with: { quotationItems: true, attachments: true, + priceAdjustmentForm: true, } }) + + // 취소된 RFQ 접근 제어 (vendor response가 취소 상태인 경우) + if (existingResponse?.status === "취소" || rfqDetail.cancelReason) { + return ( + <div className="flex h-full items-center justify-center"> + <div className="text-center"> + <h2 className="text-xl font-bold">RFQ 취소됨</h2> + <p className="mt-2 text-muted-foreground"> + 이 RFQ는 취소되어 더 이상 견적을 제출할 수 없습니다. + </p> + {rfqDetail.cancelReason && ( + <p className="mt-4 text-sm text-muted-foreground"> + 취소 사유: {rfqDetail.cancelReason} + </p> + )} + </div> + </div> + ) + } // PR Items 가져오기 const prItems = await db.query.rfqPrItems.findMany({ |
